package com.dc.designPattern._17_mediator.extend.extend2;

/**
 * Description: 具体同事类_采购管理
 * @author: gdc
 * @date: 2021/6/25
 * @version 1.0
 */
public class Purchase extends AbstractColleague{

    public Purchase(AbstractMediator abstractMediator) {
        super(abstractMediator);
    }

    /**
     * 采购
     * @param num       采购数量
     */
    public void buy(int num) {
        super.getMediator().execute("purchase.buy", num);
    }

    /**
     * 拒绝采购
     */
    public void refuseBuy() {
        System.out.println("不再采购电脑...");
    }
}
